home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / PowerPlant / LDynamicPopupMenu / LDynamicPopupMenu.h < prev    next >
Encoding:
Text File  |  1995-01-08  |  1.7 KB  |  51 lines  |  [TEXT/CWIE]

  1. // HuePopupMenu.h
  2. //        written by Constantine Spathis.
  3. //            No rights reserved, use and abuse at will!
  4. //            Thanks to the guys at Metrowerks who saved the Macintosh ( IMO :-) ) and to Greg Dow
  5. //            for creating such a cranking piece of software. And of course to Ron Liechty
  6. //            (hope I spelled that one correct) who must really be 10 guys from the way he
  7. //            keeps ontop of answering questions.
  8. //            
  9. //
  10. //        This class facilitates the creation of true(?) dynamic Pop-up menus within the 
  11. //        powerplant framework. The implementation is fairly straightforward, kill the control
  12. //        powerplant creates and create our own with the menuID s_numMenu (making sure to 
  13. //        increment it). Please let me know of any improvements you make and any bugs you might
  14. //        find.
  15. //
  16. //        1/8/95 CS
  17. //            Initial Iteration
  18.  
  19. // PowerPlant Headers
  20. #include <LStdControl.h>
  21.  
  22. class LDynamicPopupMenu
  23.     :    public LStdPopupMenu
  24. {
  25.     public:
  26.         // Class ID Enumeration see Scott Meyers, Effective C++.
  27.             enum { class_id = 'LDPM' };
  28.  
  29.         // Stream Oriented Constructor
  30.             LDynamicPopupMenu(LStream* in_pStream);
  31.  
  32.         //    Destructor
  33.             virtual ~LDynamicPopupMenu();
  34.         
  35.         // Creator Function
  36.             static LDynamicPopupMenu* CreateLDynamicPopupMenuStream(LStream* in_pStream);
  37.             
  38.         // Useful member functions
  39.             //    You'll probably want to re-define BroadcastValueMessage to do whatever
  40.             //    is appropriate in your application.
  41.             virtual void    BroadcastValueMessage();
  42.             
  43.             //    Add a menu Item. Note: the input string is a C-String
  44.             void             AddCMenuItem(const char* in_csStr);
  45.             //    Add a menu Item. Note: the input string is a P-String
  46.             void             AddPMenuItem(const StringPtr in_cpStr);
  47.             //    Call this menu when your done adding things to it
  48.             void            FinishedCreatingMenu(Int32 in_initialItem);
  49.  
  50. };
  51.